package org.csmz.class2333.innerclass;

public class Example18 {
    public static void main(String[] args){
        String name = "小明";
        new Swim(){
            @Override
            public void swimming(){
                System.out.println(name+"学会了自由泳……");
            }
        }.swimming();
        new Swim(){
            @Override
            public void swimming(){
                System.out.println(name+"学会了蛙泳……");
            }
        }.swimming();
    }
}
